
package vplot;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;

public class WFrame extends JFrame {
    public  int   figId;   // used for disposing information about Wframe on closing

    public WFrame(int id) {
        figId = id;
  
this.addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e) {
                    vfigure.allPlots[figId] = null;
                    (vfigure.allFrames[figId]).dispose();
                    vfigure.allFrames[figId] = null;
              }
         });
    }
    
    public WFrame(int id, String title) {
      figId = id;
      setTitle(title);
    }
      
    
}
